package jmine.tec.web.wicket.mock;

import jmine.tec.web.wicket.component.menu.JSCookMenuPanel;
import jmine.tec.web.wicket.component.menu.MenuPanel;
import jmine.tec.web.wicket.component.menu.MenuPrincipal;
import jmine.tec.web.wicket.component.menu.cfg.MenuConfig;
import jmine.tec.web.wicket.pages.Paging;
import jmine.tec.web.wicket.pages.Report;
import jmine.tec.web.wicket.pages.example.crud.CrudPageExample;
import jmine.tec.web.wicket.pages.example.execute.ExecutePageExample;
import jmine.tec.web.wicket.pages.example.executeajaxselection.ExecutePageAjaxExample;
import jmine.tec.web.wicket.pages.example.list.ListPageExample;
import jmine.tec.web.wicket.pages.example.report.ReportPageExample;

/**
 * Menu principal da aplicação de teste
 * 
 * @author Rafael Volpato
 * @date Oct 4, 2011
 */
public class MockMenuPrincipalConfig implements MenuPrincipal {

    /**
     * {@inheritDoc}
     */
    public MenuPanel getMenuPanel(String id) {

        MenuConfig config = new MenuConfig();
        config.addPage(Report.class, "Principal", "Report");
        config.addPage(Report.class, "Principal", "Nivel 1", "Report1");
        config.addPage(Report.class, "Principal", "Nivel 1", "Report2");
        config.addPage(Report.class, "Principal", "Nivel 1", "Report3");
        config.addPage(Report.class, "Principal", "Nivel 1", "Nivel 2", "Report2");
        config.addPage(Report.class, "Principal", "Nivel 1", "Nivel 2", "Report3");
        config.addPage(Paging.class, "Principal", "Paging");
        config.addPage(null, "Search", "Sample JSF").setAction("/protected/sample.faces");
        config.addPage(ListPageExample.class, "Example", "List Page");
        config.addPage(CrudPageExample.class, "Example", "CRUD Page");
        config.addPage(ExecutePageExample.class, "Example", "Execute Page");
        config.addPage(ExecutePageAjaxExample.class, "Example", "Execute Page (Ajax)");
        config.addPage(ReportPageExample.class, "Example", "Report Page");
        config.sort();

        return new JSCookMenuPanel(id, config);
    }

}
